home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 3.0 KB | 95 lines | [TEXT/ToyS] |
- property kasLoc : {40, 60}
-
-
- on run
- set pc to printer configuration
- set infW to (display info titled "Current Printer" message PrinterName(pc) located at kasLoc)
-
- set n to ShowLine(infW, 2, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
-
- set clr to 26 * 1024 + 29 * 32 + 26
- set n to ShowLine(infW, n, clr, "LAN Name", LAN printer name of pc)
- set n to ShowLine(infW, n, clr, "LAN Type", LAN printer type of pc)
- set n to ShowLine(infW, n, clr, "LAN Zone", LAN printer zone of pc)
- set n to ShowLine(infW, n, clr, "Driver", print driver name of pc)
- set n to ShowLine(infW, n, clr, "Paper Area", RectString(paper area of pc))
-
- set n to ShowLine(infW, n, -1, "Info", "")
- set pci to printer info of pc
- set clr to 26 * 1024 + 26 * 32 + 29
- set n to ShowLine(infW, n, clr, "Port DPI", PointString({printer hres of pci, printer vres of pci}))
- set n to ShowLine(infW, n, clr, "Port Area", RectString(printable area of pci))
-
- set n to ShowLine(infW, n, -1, "Device", "")
- set pcd to printer device info of pc
- set clr to 29 * 1024 + 26 * 32 + 26
- set n to ShowLine(infW, n, clr, "Device DPI", PointString({printer hres of pcd, printer vres of pcd}))
- set n to ShowLine(infW, n, clr, "Driver Area", RectString(printable area of pcd))
-
- set n to ShowLine(infW, n, -1, "Paper", "")
- set pcs to paper style of pc
- set clr to 29 * 1024 + 29 * 32 + 26
- set n to ShowLine(infW, n, clr, "Page Height", page height of pcs)
- set n to ShowLine(infW, n, clr, "Page Width", page width of pcs)
-
- set n to ShowLine(infW, n, -1, "Job", "")
- set pcj to print job of pc
- set clr to 26 * 1024 + 29 * 32 + 29
- set n to ShowLine(infW, n, clr, "First Page", first job page of pcj)
- set n to ShowLine(infW, n, clr, "Last Page", last job page of pcj)
- set n to ShowLine(infW, n, clr, "Copies", job copies of pcj)
-
- -- Not good practice -- drawing into an info window :)
- draw a picture into infW ¬
- using data (PrinterIcon(pc) as picture) ¬
- inside of {90, 16, 154, 80}
-
- pause for 10 with seconds timing
-
- set kasLoc to screen location of (display info infW with disposal)
- end run
-
-
- on RectString(box)
- return PointString(items 1 thru 2 of box) & ":" & PointString(items 3 thru 4 of box)
- end RectString
-
-
- on PointString(pt)
- return "(" & item 1 of pt & ¬
- ", " & item 2 of pt & ")"
- end PointString
-
-
- on ShowLine(w, lineNo, clr, lbl, txt)
- set lbl to recompose lbl padded to 20
- set txt to recompose txt padded to -20
- display info w message (lbl & txt) at line lineNo ¬
- using font "Courier" using size 10 ¬
- using bg color clr
- return lineNo + 1
- end ShowLine
-
-
- on PrinterName(prCfg)
- set choice to desktop printer name of prCfg
- if (choice is "") then set choice to (LAN printer name of prCfg)
- if (choice is "") then set choice to print driver name of prCfg
- return choice
- end PrinterName
-
-
- on PrinterIcon(pc)
- try
- set ic to desktop icon of pc
- on error
- set ic to the icon for (print driver alias of pc)
- end try
- return ic
- end PrinterIcon
-